Dynamic timeout period adjustment of service requests

ABSTRACT

According to one exemplary embodiment, a method for dynamically timing out a first process within a plurality of suspended processes is provided. The method may include determining that a second process is attempting to suspend. The method may also include determining if a number of suspended processes plus one is less than a threshold value. The method may then include selecting the first process within the plurality of suspended processes to prematurely time out based on determining that the number of suspended processes plus one is not less than the threshold value. The method may further include timing out the selected first process. The method may also include suspending the second process.

BACKGROUND

The present invention relates generally to the field of computing, andmore particularly, to service processing and management.

While servicing requests, a server may have to call out to additionalexternal services. Additional external services may be used moreubiquitously since demand has risen for smarter applications that makedecisions based on a broader set of contextual information availablefrom other systems and from the rise of micro-service architectures.

SUMMARY

According to one exemplary embodiment, a method for dynamically timingout a first process within a plurality of suspended processes isprovided. The method may include determining that a second process isattempting to suspend. The method may also include determining if anumber of suspended processes plus one is less than a threshold value.The method may then include selecting the first process within theplurality of suspended processes to prematurely time out based ondetermining that the number of suspended processes plus one is not lessthan the threshold value. The method may further include timing out theselected first process. The method may also include suspending thesecond process.

According to another exemplary embodiment, a computer system fordynamically timing out a first process within a plurality of suspendedprocesses is provided. The computer system may include one or moreprocessors, one or more computer-readable memories, one or morecomputer-readable tangible storage devices, and program instructionsstored on at least one of the one or more storage devices for executionby at least one of the one or more processors via at least one of theone or more memories, whereby the computer system is capable ofperforming a method. The method may also include determining if a numberof suspended processes plus one is less than a threshold value. Themethod may then include selecting the first process within the pluralityof suspended processes to prematurely time out based on determining thatthe number of suspended processes plus one is not less than thethreshold value. The method may further include timing out the selectedfirst process. The method may also include suspending the secondprocess.

According to yet another exemplary embodiment, a computer programproduct for dynamically timing out a first process within a plurality ofsuspended processes is provided. The computer program product mayinclude one or more computer-readable storage devices and programinstructions stored on at least one of the one or more tangible storagedevices, the program instructions executable by a processor. Thecomputer program product may include program instructions to determinethat a second process is attempting to suspend. The computer programproduct may also include program instructions to determine if a numberof suspended processes plus one is less than a threshold value. Thecomputer program product may then include program instructions to selectthe first process within the plurality of suspended processes toprematurely time out based on determining that the number of suspendedprocesses plus one is not less than the threshold value. The computerprogram product may further include program instructions to time out theselected first process. The computer program product may also includeprogram instructions to suspend the second process.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

These and other objects, features and advantages of the presentinvention will become apparent from the following detailed descriptionof illustrative embodiments thereof, which is to be read in connectionwith the accompanying drawings. The various features of the drawings arenot to scale as the illustrations are for clarity in facilitating oneskilled in the art in understanding the invention in conjunction withthe detailed description. In the drawings:

FIG. 1 illustrates a networked computer environment according to atleast one embodiment;

FIG. 2 is an operational flow chart illustrating a process for dynamictimeout period adjustment according to at least one embodiment;

FIG. 3A-3D are examples of concurrent process handling scenariosaccording to at least one embodiment;

FIG. 4 is a block diagram of internal and external components ofcomputers and servers depicted in FIG. 1 according to at least oneembodiment;

FIG. 5 is a block diagram of an illustrative cloud computing environmentincluding the computer system depicted in FIG. 1, in accordance with anembodiment of the present disclosure; and

FIG. 6 is a block diagram of functional layers of the illustrative cloudcomputing environment of FIG. 5, in accordance with an embodiment of thepresent disclosure.

DETAILED DESCRIPTION

Detailed embodiments of the claimed structures and methods are disclosedherein; however, it can be understood that the disclosed embodiments aremerely illustrative of the claimed structures and methods that may beembodied in various forms. This invention may, however, be embodied inmany different forms and should not be construed as limited to theexemplary embodiments set forth herein. Rather, these exemplaryembodiments are provided so that this disclosure will be thorough andcomplete and will fully convey the scope of this invention to thoseskilled in the art. In the description, details of well-known featuresand techniques may be omitted to avoid unnecessarily obscuring thepresented embodiments.

The present invention may be a system, a method, and/or a computerprogram product at any possible technical detail level of integration.The computer program product may include a computer readable storagemedium (or media) having computer readable program instructions thereonfor causing a processor to carry out aspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, configuration data for integrated circuitry, oreither source code or object code written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Smalltalk, C++, or the like, and procedural programminglanguages, such as the “C” programming language or similar programminglanguages. The computer readable program instructions may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider). In some embodiments, electronic circuitry including,for example, programmable logic circuitry, field-programmable gatearrays (FPGA), or programmable logic arrays (PLA) may execute thecomputer readable program instructions by utilizing state information ofthe computer readable program instructions to personalize the electroniccircuitry, in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the blocks may occur out of theorder noted in the Figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The following described exemplary embodiments provide a system, methodand program product for dynamic adjustment of timeout periods forservice requests to maintain server throughput. As such, the presentembodiment has the capacity to improve the technical field of serviceprocessing and management by adding a maximum waiting threshold and whenthe number of waiting processes meets the maximum waiting threshold, anynew process that attempts to suspend may trigger a response that mayselect a currently waiting process and time out the selected processearly before allowing another process to suspend, thus maintaining themaximum waiting processes under the threshold.

As described previously, while servicing requests, a server may have tocall out to additional external services. Additional external servicesmay be used more ubiquitously since demand has risen for smarterapplications that make decisions based on a broader set of contextualinformation available from other systems and from the rise ofmicro-service architectures.

To stop requests to external services from waiting indefinitely, if theservice becomes unresponsive, a timeout is traditionally set on the call(or for all calls in the system) that denotes the maximum amount of timeto wait for a call to complete. In the case when a server calls to anexternal service and the server is waiting for a response longer thanthe predefined amount of time specified for the timeout, the server maystop waiting and return a timed out error condition to the callingprocess notifying the process of the timeout condition.

Timeouts may stop processes from waiting an indefinite amount of timefor external service calls that may otherwise clog up the system.However, for a system interested in maintaining a level of throughput ofrequests served, timeouts are nearly impossible to set correctly since acorrect timeout value for one situation may be wrong for anothersituation when the dynamics of the workload and behavior may havechanged.

For example, a server may serve requests that take an average of 1.0second to process from end-to-end and may be limited to 1000 concurrentrequests. Half of the 1.0 second response time may be taken up by a callto an external service. Under normal circumstances, the external servicecall may respond with an average response time of 0.5 seconds, however,each call to the service may vary between 0.1 seconds and 3.0 seconds.The timeout for the service call may be set to 3.0 seconds sincerequests may occasionally take that long and it may be preferable toavoid timing out a valid request prematurely. Furthermore, a requirementmay be set to be able to handle a peak throughput Service LevelAgreement (SLA) of 500 requests per second.

Under normal conditions, the server may serve 1000 requests in parallelat an average response time of 1.0 second per request and thus have amaximum throughput of 1000 requests per second. Since this is muchhigher than the 500 requests per second of the SLA, the server is ableto handle current loads with the timeout set to 3.0 seconds.

If the external service's average response time increases to 1.5seconds, the server's total response time increases to 2.0 seconds perrequest (i.e., 1.5 seconds for external and 0.5 for internal latencies).The maximum throughput would then lower to 500 requests per second whichmatches the SLA, thus the server is still keeping up with the SLA.

If the external service provider becomes slower, for instance due tomaintenance, average response time may increase to 2.5 seconds perrequest with some requests taking up to 4.0 seconds. At an average rateof 3.0 seconds per request, the server's maximum throughput may bereduced to 333 requests per second. This would result in the serverfailing to meet the SLA. If the current workload is low (i.e., 200requests per second) the server may still meet the SLA. Since some goodexternal service requests may take more than 3.0 seconds to respond,these external service requests will be timed out unnecessarily sincethe server still has resources available to wait longer (e.g., 4.0seconds) in order to avoid timing out requests.

However, if the external service provider continues to run slowly withthe server's maximum throughput still at 333 requests per second, andthe workload increases from 200 requests per second to 500 requests persecond, the server may queue inbound requests at a rate of 167 requestsper second. As the server runs out of storage space (due to the growingqueue), the server may become crippled and stop responding. In thiscase, a lower timeout value, such as 1.0 seconds, may have helped toabandon the longest of the external service requests, maintainthroughput, and still service some of the incoming requests.

Thus, whatever fixed value is chosen for timing out requests, there maybe situations when it is either too low or too high for the currentworkload. If the timeout value selected is too low, requests may betimed out that could have completed successfully. If the timeout valueselected is too high, the result may impact throughput, queue uprequests, take down servers, and miss SLAs.

Therefore, it may be advantageous to, among other things, provide a wayto dynamically adjust timeout periods of service requests to maintainserver throughput by choosing waiting processes to time out early basedon selection criteria when the number of waiting processes exceeds athreshold value.

According to at least one embodiment, a maximum waiting threshold valuemay be used to denote the maximum number of processes in the server thatare allowed to be waiting for a response from an external service at onetime. The maximum waiting threshold may be less than the maximum numberof concurrent processes allowed in the server at one time (e.g., due tomemory limitations or other resource limitations) and may be derivedfrom the maximum number of concurrent processes allowed in the server(e.g., MaxWaiting may equal 75% of MaxProcesses). In virtualenvironments, the maximum waiting threshold may be based on the amountof resources allocated to the virtual machine.

If the number of waiting processes is less than max waiting, thentimeouts may proceed to function according to their default behavior. Ifa new process wants to suspend (i.e., start waiting for an externalservice) which would make the waiting processes exceed the maximumwaiting threshold, then one of the currently waiting processes may beselected and timed out early. The currently waiting process selected forearly timeout may be selected based on the process closest(proportionately) to timing out naturally. Thus, the system may time outmore aggressively when the system needs to keep up with current workloaddemands.

According to at least one other embodiment, the system may optionallyignore timeouts altogether and just wait as long as required for aresponse, using timeouts only as an aid to select which process to timeout prematurely in the event that MaxWaiting is reached.

Referring to FIG. 1, an exemplary networked computer environment 100 inaccordance with one embodiment is depicted. The networked computerenvironment 100 may include a computer 102 with a processor 104 and adata storage device 106 that is enabled to run a software program 108and a dynamic service timeout program 110 a. The networked computerenvironment 100 may also include a server 112 that is enabled to run adynamic service timeout program 110 b that may interact with a database114 and a communication network 116. The networked computer environment100 may include a plurality of computers 102 and servers 112, only oneof which is shown. The communication network may include various typesof communication networks, such as a wide area network (WAN), local areanetwork (LAN), a telecommunication network, a wireless network, a publicswitched network and/or a satellite network. It should be appreciatedthat FIG. 1 provides only an illustration of one implementation and doesnot imply any limitations with regard to the environments in whichdifferent embodiments may be implemented. Many modifications to thedepicted environments may be made based on design and implementationrequirements.

The client computer 102 may communicate with the server computer 112 viathe communications network 116. The communications network 116 mayinclude connections, such as wire, wireless communication links, orfiber optic cables. As will be discussed with reference to FIG. 4,server computer 112 may include internal components 902 a and externalcomponents 904 a, respectively, and client computer 102 may includeinternal components 902 b and external components 904 b, respectively.Server computer 112 may also operate in a cloud computing service model,such as Software as a Service (SaaS), Platform as a Service (PaaS), orInfrastructure as a Service (IaaS). Server 112 may also be located in acloud computing deployment model, such as a private cloud, communitycloud, public cloud, or hybrid cloud. Client computer 102 may be, forexample, a mobile device, a telephone, a personal digital assistant, anetbook, a laptop computer, a tablet computer, a desktop computer, orany type of computing devices capable of running a program, accessing anetwork, and accessing a database 114. According to variousimplementations of the present embodiment, the dynamic service timeoutprogram 110 a, 110 b may interact with a database 114 that may beembedded in various storage devices, such as, but not limited to acomputer/mobile device 102, a networked server 112, or a cloud storageservice.

According to the present embodiment, a user using a client computer 102or a server computer 112 may use the dynamic service timeout program 110a, 110 b (respectively) to maintain server throughput by limiting theamount of processes that may wait for an external service by selectingand prematurely timing out a currently waiting process if a new processattempts to suspend when the maximum number of waiting processes meets athreshold value. The dynamic service timeout method is explained in moredetail below with respect to FIG. 2.

Referring now to FIG. 2, an operational flow chart illustrating theexemplary process 200 by the dynamic service timeout program 110 a and110 b (FIG. 1) according to at least one embodiment is depicted.

At 202, process (i.e., service) A wants to suspend execution to wait foran external service call to complete. According to at least oneembodiment, a process being executed by a computer (e.g., a server suchas server 112 (FIG. 1)) may need to perform an external service call inthe course of executing on the computer. The process may not be able tocontinue execution until a response is received from the externalservice, thus the process may attempt to suspend execution until theexternal service call completes.

For example, a banking program executing on a server (e.g., 112 (FIG.1)) may need to query stock prices in the course of execution. Process Passociated with the banking program, such as a process calculating thetotal investments of a customer, may have code that queries stockprices. The query for stock prices may be an external service call thattravels over a communications network (e.g., 116 (FIG. 1)) to a remotecomputer (e.g., 102 (FIG. 1)) that may determine stock prices and returnthe result over the communications network (e.g., 116 (FIG. 1)) to theprocess executing on the server (e.g., 112 (FIG. 1)). Since process Pmay not be able to continue execution until the external service callcompletes and the requested stock prices are returned, process P mayattempt to suspend until a response is received.

Next, at 204, it is determined if adding the process wanting to suspendto the current number of suspended processes (i.e., as denoted by thevalue of variable CurrentWaiting+1) is less than a threshold value(i.e., as denoted by the value of MaxWaiting). According to at least oneembodiment, the threshold value may be a predetermined value set todenote the maximum amount of processes that may be suspended at the sametime. The threshold value may be set to be less than the maximum numberof concurrent processes allowed (e.g., denoted by an integerMaxProcesses) at any one time and may be derived from the maximum numberof concurrent processes allowed (e.g., MaxWaiting=75% of MaxProcesses).A comparison may be performed to determine if the value ofCurrentWaiting would be less than the threshold value MaxWaiting if theprocess attempting to suspend at 202 is allowed to suspend.

For example, if the maximum number of concurrent processes allowed onserver 112 (FIG. 1) is 25 (i.e., MaxProcesses=25), the threshold valueis 75% of the MaxProcesses value (i.e., MaxWaiting is rounded to 19),and the current number of suspended processes (i.e., CurrentWaiting) is17, then it would be determined that CurrentWaiting+1 (i.e., 17+1=18) isless than the threshold value MaxWaiting (i.e., 19).

According to at least one other embodiment, the MaxWaiting thresholdvalue may be a dynamic value that may be automatically modified. A usermay set a range within which the threshold value may be set (e.g.,between 30% and 70% of MaxProcesses). Then, the dynamic service timeoutprogram 110 a and 110 b (FIG. 1) may alter the threshold value based onmeasurable system conditions, such as inbound work rate. Raising thethreshold value may have the effect of allowing more time for processesto complete successfully at the detriment of potential systemthroughput. Lowering the threshold value may time out processes moreaggressively to maintain or increase throughput.

If it is determined that the process wanting to suspend added to thecurrent number of suspended processes is not less than the thresholdvalue at 204, then a process that is currently suspended (e.g., processB) may be selected for early timeout at 206. According to at least oneembodiment, a dispatcher entity executing on an electronic device (e.g.,server 112 (FIG. 1)) may track the currently suspended processes using adata structure, such as a list. The dispatcher may select a process fromthe list of suspended processes according to selection criteria forearly timeout to allow the process that is attempting to suspend (i.e.,at 202) to suspend while maintaining the MaxWaiting threshold.

According to at least one implementation, selection criteria may includeselecting the process that is closest proportionally to reaching theprocess' timeout threshold. The dispatcher may query each task todetermine how long each task has waited for a response. The result ofthe query to each task may be expressed as a percentage of the task'stotal timeout value and then the dispatcher may rank the returnedqueries by percentage of timeout value and select the task with thehighest percentage as the candidate process to prematurely time out.

For example, for processes P₁ and P₂, P₁ has a timeout threshold of 1.0seconds and P₂ has a timeout threshold of 2.0 seconds. If P₁ has beenwaiting for 0.5 seconds and P₂ has been waiting for 0.8 seconds, P₁ maybe selected for early timeout even though P₁ has been waiting less time.P₁ may be selected since P₁ has been waiting for 50% of P₁'s timeoutthreshold whereas P₂ has only waited for 40% of P₂'s timeout threshold.Thus, simpler/shorter request may not be favored over more complexrequests. Instead, requests exhibiting normal response times may befavored over requests exhibiting abnormal response times.

According to at least one other embodiment, the dispatcher may queryeach task and obtain a result expressed as the amount of actual timeremaining until the external service call would time out naturally. Forexample, if a process has a 2.0 second timeout value, and has waited 0.4seconds, the result of the dispatcher's query would be 1.6 seconds ofactual time remaining.

It may be appreciated that other selection criteria may be employed toselect a process for early timeout, such as criteria that favors highpriority workloads over low priority workloads or favoring healthyapplications over unhealthy applications, etc. Furthermore, selectioncriteria may include a combination of different criteria or maydynamically switch between different selection criteria based on workingconditions.

Then, at 208, the selected process B is forced to prematurely timeout.According to at least one embodiment, the dispatcher, or other entitytasked with handling processes, may prematurely time out the processselected previously at 206. The dispatcher may have a “Force PrematureTimeout” event added that may cause a suspended process to resume as ifthe process' external service call had timed out. Thus, the previouslyselected process (i.e., at 206) that was suspended, may resume inresponse the “Force Premature Timeout” event. As will be discussedbelow, once a process is forced to prematurely time out, theCurrentWaiting counter may be decremented to accurately reflect thenumber of processes currently waiting.

For example, the current suspended processes in server 112 (FIG. 1) mayinclude processes P₁, P₂, and P₃. If process P₂ was selected previouslyto be prematurely timed out at 206, the dispatcher may invoke a “ForcePremature Timeout” event for process P₂. Thereafter, process P₂ mayresume. The current suspended processes in server 112 (FIG. 1) may thenbe processes P₁ and P₃.

If it is determined that the process wanting to suspend (i.e., processA) added to the current number of suspended processes is less than thethreshold value at 204, or if process B was prematurely timed out at208, then the external call requested by process A is made, process A issuspended, and the CurrentWaiting variable is incremented at 210.According to at least one embodiment, the external service calloriginating from process A may be made, the dispatcher may suspendprocess A and the dispatcher may also add process A to the list ofwaiting processes. Since one more process has been added to the list ofsuspended processes, the variable CurrentWaiting may also be incrementedto reflect the current total of suspended processes awaiting responsesfrom external service calls.

Continuing the above example, if process P₄ wants to make an externalservice call to another computer 102 (FIG. 1) and suspend, thedispatcher in server 112 (FIG. 1) may make the external service call andsuspend process P₄. Process P₄ may then be added to the list of waitingprocesses with processes P₁ and P₃. Thus, the list of waiting processeswould become P₁, P₃, and P₄. The CurrentWaiting variable may then beincremented from 2 to 3 to reflect that there are three waitingprocesses.

At 212, a response to process A's external service call is received.According to at least one embodiment, once the external computer (e.g.,102 (FIG. 1)) receives and processes the external service request, thecomputer processing the external service request may send a responseback to the electronic device (e.g., server 112 (FIG. 1)) handlingprocess A. An entity, such as a response handler, may determine if aresponse was received and notify the dispatcher.

At 214, it is determined if a timeout condition has elapsed for processA's external service call. According to at least one embodiment, thedispatcher may determine, using known methods, when the time elapsedsince the external service call was made exceeds the predeterminedtimeout value.

At 216, it is determined if a premature timeout is being forced onprocess A. According to at least one embodiment, the dispatcher mayprematurely timeout process A using the “Force Premature Timeout” eventdescribed above previously.

Then, at 218, process A is resumed and the CurrentWaiting variable isdecremented when either a response is received at 212, a timeout haselapsed at 214, or a premature timeout was forced at 216. According toat least one embodiment, the dispatcher may resume process A anddecrement the CurrentWaiting variable to accurately reflect that thenumber of currently waiting processes has decreased by one since processA has resumed.

Referring now to FIGS. 3A-3D, block diagrams illustrating a process list300 in various process handling scenarios are depicted.

FIG. 3A is a block diagram of the process list 300 showing the maximumconcurrent processes 302 that may be allowed on the server (e.g., 112(FIG. 1)) handling the processes with some capacity used for runningprocesses 304. Out of the maximum concurrent processes 302 allowed, somerunning processes 304 are executing and the unused capacity 306 accountsfor the remainder of the maximum concurrent processes 302 allowed.

FIG. 3B is a block diagram of the process list 300 showing processestransitioning from a waiting state to a working state under normalconditions. Processes in the list of processes 300 transition fromrunning process 304 to suspended processes 308 and vice versa. Thecombined total of running processes 304 and suspended processes 308 areless than the maximum concurrent processes 302 allowed, thus leavingunused capacity 306.

FIG. 3C is a block diagram of the process list 300 showing processestransitioning from a waiting state to a working state under increasedload conditions. A greater number of processes in the list of processes300 transition from running process 304 to suspended processes 308 dueto increased external service request response times. The combined totalof the running processes 304 and additional suspended processes 308 arestill less than the maximum concurrent processes 302 allowed leading toa reduced amount of unused capacity 306.

FIG. 3D is a block diagram of the process list 300 with a MaxWaitingthreshold 308 according to at least one embodiment. As the number ofsuspended processes 306 increases, the MaxWaiting threshold 308 valuecaps the suspended processes 306 such that there may always be some ofthe maximum concurrent processes 302 resources available to executerunning processes 304. As described previously with respect to FIG. 2,when suspended processes 306 increase and reach the MaxWaiting threshold308, a process from running processes 304 that attempts to suspend mayprompt the dispatcher to select a suspended process from the suspendedprocesses 306 to prematurely time out in order to allow for one of therunning processes 304 to suspend. Thus, the number of suspendedprocesses 306 may remain below the MaxWaiting threshold 308 value.

FIG. 4 is a block diagram 900 of internal and external components ofcomputers depicted in FIG. 1 in accordance with an illustrativeembodiment of the present invention. It should be appreciated that FIG.4 provides only an illustration of one implementation and does not implyany limitations with regard to the environments in which differentembodiments may be implemented. Many modifications to the depictedenvironments may be made based on design and implementationrequirements.

Data processing system 902, 904 is representative of any electronicdevice capable of executing machine-readable program instructions. Dataprocessing system 902, 904 may be representative of a smart phone, acomputer system, PDA, or other electronic devices. Examples of computingsystems, environments, and/or configurations that may represented bydata processing system 902, 904 include, but are not limited to,personal computer systems, server computer systems, thin clients, thickclients, hand-held or laptop devices, multiprocessor systems,microprocessor-based systems, network PCs, minicomputer systems, anddistributed cloud computing environments that include any of the abovesystems or devices.

User client computer 102 (FIG. 1), and network server 112 (FIG. 1) mayinclude respective sets of internal components 902 a, b and externalcomponents 904 a, b illustrated in FIG. 4. Each of the sets of internalcomponents 902 a, b includes one or more processors 906, one or morecomputer-readable RAMs 908 and one or more computer-readable ROMs 910 onone or more buses 912, and one or more operating systems 914 and one ormore computer-readable tangible storage devices 916. The one or moreoperating systems 914 and the software program 108 (FIG. 1) and thedynamic service timeout program 110 a (FIG. 1) in client computer 102(FIG. 1) and the dynamic service timeout program 110 b (FIG. 1) innetwork server 112 (FIG. 1), may be stored on one or morecomputer-readable tangible storage devices 916 for execution by one ormore processors 906 via one or more RAMs 908 (which typically includecache memory). In the embodiment illustrated in FIG. 4, each of thecomputer-readable tangible storage devices 916 is a magnetic diskstorage device of an internal hard drive. Alternatively, each of thecomputer-readable tangible storage devices 916 is a semiconductorstorage device such as ROM 910, EPROM, flash memory or any othercomputer-readable tangible storage device that can store a computerprogram and digital information.

Each set of internal components 902 a, b also includes a R/W drive orinterface 918 to read from and write to one or more portablecomputer-readable tangible storage devices 920 such as a CD-ROM, DVD,memory stick, magnetic tape, magnetic disk, optical disk orsemiconductor storage device. A software program, such as the softwareprogram 108 (FIG. 1) and the dynamic service timeout program 110 a and110 b (FIG. 1) can be stored on one or more of the respective portablecomputer-readable tangible storage devices 920, read via the respectiveR/W drive or interface 918 and loaded into the respective hard drive916.

Each set of internal components 902 a, b may also include networkadapters (or switch port cards) or interfaces 922 such as a TCP/IPadapter cards, wireless wi-fi interface cards, or 3G or 4G wirelessinterface cards or other wired or wireless communication links. Thesoftware program 108 (FIG. 1) and the dynamic service timeout program110 a (FIG. 1) in client computer 102 (FIG. 1) and the dynamic servicetimeout program 110 b (FIG. 1) in network server computer 112 (FIG. 1)can be downloaded from an external computer (e.g., server) via a network(for example, the Internet, a local area network or other, wide areanetwork) and respective network adapters or interfaces 922. From thenetwork adapters (or switch port adaptors) or interfaces 922, thesoftware program 108 (FIG. 1) and the dynamic service timeout program110 a (FIG. 1) in client computer 102 (FIG. 1) and the dynamic servicetimeout program 110 b (FIG. 1) in network server computer 112 (FIG. 1)are loaded into the respective hard drive 916. The network may comprisecopper wires, optical fibers, wireless transmission, routers, firewalls,switches, gateway computers and/or edge servers.

Each of the sets of external components 904 a, b can include a computerdisplay monitor 924, a keyboard 926, and a computer mouse 928. Externalcomponents 904 a, b can also include touch screens, virtual keyboards,touch pads, pointing devices, and other human interface devices. Each ofthe sets of internal components 902 a, b also includes device drivers930 to interface to computer display monitor 924, keyboard 926, andcomputer mouse 928. The device drivers 930, R/W drive or interface 918and network adapter or interface 922 comprise hardware and software(stored in storage device 916 and/or ROM 910).

It is understood in advance that although this disclosure includes adetailed description on cloud computing, implementation of the teachingsrecited herein are not limited to a cloud computing environment. Rather,embodiments of the present invention are capable of being implemented inconjunction with any other type of computing environment now known orlater developed.

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g. networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Service Models are as follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface such as a web browser (e.g., web-based e-mail).The consumer does not manage or control the underlying cloudinfrastructure including network, servers, operating systems, storage,or even individual application capabilities, with the possible exceptionof limited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting forload-balancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure comprising anetwork of interconnected nodes.

Referring now to FIG. 5, illustrative cloud computing environment 1000is depicted. As shown, cloud computing environment 1000 comprises one ormore cloud computing nodes 100 with which local computing devices usedby cloud consumers, such as, for example, personal digital assistant(PDA) or cellular telephone 1000A, desktop computer 1000B, laptopcomputer 1000C, and/or automobile computer system 1000N may communicate.Nodes 100 may communicate with one another. They may be grouped (notshown) physically or virtually, in one or more networks, such asPrivate, Community, Public, or Hybrid clouds as described hereinabove,or a combination thereof. This allows cloud computing environment 1000to offer infrastructure, platforms and/or software as services for whicha cloud consumer does not need to maintain resources on a localcomputing device. It is understood that the types of computing devices1000A-N shown in FIG. 5 are intended to be illustrative only and thatcomputing nodes 100 and cloud computing environment 1000 can communicatewith any type of computerized device over any type of network and/ornetwork addressable connection (e.g., using a web browser).

Referring now to FIG. 6, a set of functional abstraction layers 1100provided by cloud computing environment 1000 (FIG. 5) is shown. Itshould be understood in advance that the components, layers, andfunctions shown in FIG. 6 are intended to be illustrative only andembodiments of the invention are not limited thereto. As depicted, thefollowing layers and corresponding functions are provided:

Hardware and software layer 60 includes hardware and softwarecomponents. Examples of hardware components include: mainframes 61; RISC(Reduced Instruction Set Computer) architecture based servers 62;servers 63; blade servers 64; storage devices 65; and networks andnetworking components 66. In some embodiments, software componentsinclude network application server software 67 and database software 68.

Virtualization layer 70 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers71; virtual storage 72; virtual networks 73, including virtual privatenetworks; virtual applications and operating systems 74; and virtualclients 75.

In one example, management layer 80 may provide the functions describedbelow. Resource provisioning 81 provides dynamic procurement ofcomputing resources and other resources that are utilized to performtasks within the cloud computing environment. Metering and Pricing 82provide cost tracking as resources are utilized within the cloudcomputing environment, and billing or invoicing for consumption of theseresources. In one example, these resources may comprise applicationsoftware licenses. Security provides identity verification for cloudconsumers and tasks, as well as protection for data and other resources.User portal 83 provides access to the cloud computing environment forconsumers and system administrators. Service level management 84provides cloud computing resource allocation and management such thatrequired service levels are met. Service Level Agreement (SLA) planningand fulfillment 85 provide pre-arrangement for, and procurement of,cloud computing resources for which a future requirement is anticipatedin accordance with an SLA.

Workloads layer 90 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation 91; software development and lifecycle management 92; virtualclassroom education delivery 93; data analytics processing 94;transaction processing 95; and dynamic service timeout 96. A dynamicservice timeout program 110 a, 110 b (FIG. 1) provides a way to maintainserver throughput by limiting the amount of processes that may wait foran external service by selecting and prematurely timing out a currentlywaiting process if a new process attempts to suspend when the maximumnumber of waiting processes meets a threshold value.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

1.-8. (canceled)
 9. A computer system for dynamically timing out a firstprocess within a plurality of suspended processes, comprising: one ormore processors, one or more computer-readable memories, one or morecomputer-readable tangible storage medium, and program instructionsstored on at least one of the one or more tangible storage medium forexecution by at least one of the one or more processors via at least oneof the one or more memories, wherein the computer system is capable ofperforming a method comprising: determining that a second process isattempting to suspend; determining if a number of suspended processesplus one is less than a threshold value; selecting the first processwithin the plurality of suspended processes to prematurely time outbased on determining that the number of suspended processes plus one isnot less than the threshold value; timing out the selected firstprocess; and suspending the second process.
 10. The computer system ofclaim 9, wherein the threshold value comprises a value based on aportion of a maximum concurrent processes value.
 11. The computer systemof claim 9, wherein the threshold value comprises a variable based on atleast one of a maximum concurrent processes value, a value range, and atleast one measurable system condition.
 12. The computer system of claim9, wherein selecting the first process within the plurality of suspendedprocesses to prematurely time out comprises selecting a suspendedprocess having a lowest actual time remaining to time out from theplurality of suspended processes as the first process.
 13. The computersystem of claim 9, wherein selecting the first process within theplurality of suspended processes to prematurely time out comprisesselecting a suspended process having a lowest percentage of a totaltimeout time remaining from the plurality of suspended processes as thefirst process.
 14. The computer system of claim 9, wherein selecting thefirst process within the plurality of suspended processes to prematurelytime out comprises ordering the plurality of suspended processes basedon a workload priority value associated with each suspended processwithin the plurality of processes and selecting a lowest workloadpriority process from the plurality of suspended processes as the firstprocess.
 15. The computer system of claim 9, further comprising:removing the selected first process from the plurality of suspendedprocesses; and adding the second process to the plurality of suspendedprocesses.
 16. The computer system of claim 9, wherein the number ofsuspended processes corresponds to the plurality of suspended processes.17. A computer program product for dynamically timing out a firstprocess within a plurality of suspended processes, comprising: one ormore computer-readable storage medium and program instructions stored onat least one of the one or more tangible storage medium, the programinstructions executable by a processor, the program instructionscomprising: program instructions to determine that a second process isattempting to suspend; program instructions to determine if a number ofsuspended processes plus one is less than a threshold value; programinstructions to select the first process within the plurality ofsuspended processes to prematurely time out based on determining thatthe number of suspended processes plus one is not less than thethreshold value; program instructions to time out the selected firstprocess; and program instructions to suspend the second process.
 18. Thecomputer program product of claim 17, wherein the threshold valuecomprises a value based on a portion of a maximum concurrent processesvalue.
 19. The computer program product of claim 17, wherein thethreshold value comprises a variable based on at least one of a maximumconcurrent processes value, a value range, and at least one measurablesystem condition.
 20. The computer program product of claim 17, whereinthe program instructions to select the first process within theplurality of suspended processes to prematurely time out comprisesselecting a suspended process having a lowest actual time remaining totime out from the plurality of suspended processes as the first process.